home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Hardware / PC Card SDKs / PC Card Manager 2.0 SDK / Software / CRM Sample / DumpSerialPorts.c next >
Encoding:
C/C++ Source or Header  |  1997-06-05  |  641 b   |  32 lines  |  [TEXT/CWIE]

  1. /*
  2.      File:        DumpSerialPorts.c
  3.  
  4.      Contains:    Code which utilizes the routines in SerialPortRoutines.c to
  5.                  display a list of serial ports to the debugger via DebugStr.
  6.  */
  7.  
  8. #include "SerialPortUtilities.h"
  9.  
  10. // function prototypes
  11.  
  12. void            main(void);
  13. static void        DumpSerialPortInfo(CRMSerialPtr serialPortInfo,void * unusedParam);
  14.  
  15.  
  16. void main()
  17.     {
  18.     ForEachSerialPort(DumpSerialPortInfo,NULL);
  19.     
  20.     if (GetCRMSerialPtrForPort("\pInternal Modem") != NULL)
  21.         {
  22.         DebugStr("\pfound info for internal modem");
  23.         }
  24.     }
  25.  
  26.  
  27. static void
  28. DumpSerialPortInfo(CRMSerialPtr serialPortInfo,void * /* unusedParam */)
  29.     {
  30.     DebugStr(*(serialPortInfo->name));
  31.     }
  32.